Skip to content

fix(ui): auto-close date-time-picker on selection and add tests#449

Open
ParasKhandelwal1616 wants to merge 3 commits intoCCExtractor:mainfrom
ParasKhandelwal1616:test/add-ui-component-tests
Open

fix(ui): auto-close date-time-picker on selection and add tests#449
ParasKhandelwal1616 wants to merge 3 commits intoCCExtractor:mainfrom
ParasKhandelwal1616:test/add-ui-component-tests

Conversation

@ParasKhandelwal1616
Copy link
Contributor

@ParasKhandelwal1616 ParasKhandelwal1616 commented Feb 4, 2026

Description

  Adds unit tests for the `DateTimePicker` component, covering its rendering, interaction flows 
  (opening, closing, date selection), and state management. This ensures the component's 
  stability  and proper functioning, particularly its intended automatic closing behavior upon date 
  selection.


       [x] Ran `npx prettier --write .` (for formatting)
       [ ] Ran `gofmt -w .` (for Go backend)
       [x] Ran `npm test` (for JS/TS testing)
       [x] Added unit tests, if applicable
       [x] Verified all tests pass
       [ ] Updated documentation, if needed

Fixes: #352

Additional Notes-

  This PR focuses on improving test coverage and reinforcing the intended behavior of the 
  `DateTimePicker` component. 
Screenshot from 2026-02-04 18-19-59

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParasKhandelwal1616 The PR description could use more clarity so please refactor it for better readability.

Also, the DatePicker closing automatically after a date is selected is intentional. It helps avoid accidental closures when a wrong date is chosen and is outside the scope of this issue. Although I am open for suggestions for this, so kindly open an issue for that separately, if required.

As mentioned earlier, no functional changes were expected for this PR, hence please revert those changes. Also the tests seem to be placed in incorrect dirs, kindly place them in __tests__ directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test suites for Frontend files to bump overall coverage

2 participants